import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  // path: '/PeopleManagement',
  // component: () => import('@/views/PeopleManagement/index.vue'),
  // name: 'PeopleManagement',
  // meta: {
  //   // title: $t('route.tabbar'),
  //   title: '人员管理',
  //   icon: 'ic:baseline-people-alt',
  //   singleMenu: true,
  // },
  path: '/PeopleManagement',
  component: Layout,
  redirect: '/PeopleManagement/index',
  name: 'PeopleManagement',
  meta: {
    title: '人员管理',
    icon: 'ic:baseline-people-alt',
  },
  children: [
    {
      path: 'index',
      name: 'PeopleManagementIndex',
      component: () => import('@/views/PeopleManagement/index.vue'),
      meta: {
        title: '人员管理',
        menu: false,
        breadcrumb: false,
        activeMenu: '/PeopleManagement',
      },
    },
    {
      path: 'detail',
      name: 'PeopleManagementDetail',
      component: () => import('@/views/PeopleManagement/detail.vue'),
      meta: {
        title: '人员设置',
        auth: ['permission.browse'],
        menu: false,
        breadcrumb: false,
        activeMenu: '/PeopleManagement',
      },
    },
  ],
}

export default routes
